import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
// 导入全局样式
import './assets/css/global.css'
import http from  '../dist/http'
Vue.use(http)

import axios from 'axios'

// 配置请求路径 ：https://www.liulongbin.top:8888/api/private/v1/
// http://192.168.31.121:8084/
// axios.defaults.baseURL='/api'
// axios.defaults.headers.get['Content-Type'] = 'application/x-www-form-urlencoded';

import VueQuillEditor from 'vue-quill-editor'

import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme

Vue.use(VueQuillEditor)


// 设置拦截器
axios.interceptors.request.use(config => {
  console.log(config);
  config.headers.Authorization = window.sessionStorage.getItem('token')
  // 在最后必须return config
  return config
})
// Vue.prototype.$http = axios

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
